// 添加请求拦截器
axios.interceptors.request.use((config) => {
	return config;
},(error) => {
	return Promise.reject(error);
});
axios.defaults.withCredentials=true;
// 添加响应拦截器
axios.interceptors.response.use(
	(response) => {
		const res = response.data;
		return res;
	},
	(error) => {
		return error;
	}
);
const getRequest = (url,params) => {
    return axios({
        method: 'GET',
		headers: { 
			'Content-Type': 'application/json;charset=UTF-8',
			'token':"123456"
		},
		timeout: 1000*60,
        baseURL: config.baseURL + `${url}`,
        params: params,
    });
};
const postRequest = (url,params) => {
    return axios({
        method: 'POST',
		headers: { 
			'Content-Type': 'application/json;charset=UTF-8',
			'token':"123456"
		},
		timeout: 1000*60*5,
        baseURL: config.baseURL + `${url}`,
        data: params,
		
    });
};